/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.restaurant.domain;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author root
 */
@Entity
@Table(name = "transactiontype")
@XmlRootElement(name = "transactiontype")
@NamedQueries({
    @NamedQuery(name = "Transactiontype.findAll", query = "SELECT t FROM Transactiontype t"),
    @NamedQuery(name = "Transactiontype.findByTransactiontypeID", query = "SELECT t FROM Transactiontype t WHERE t.transactiontypeID = :transactiontypeID"),
    @NamedQuery(name = "Transactiontype.findByTransactypename", query = "SELECT t FROM Transactiontype t WHERE t.transactypename = :transactypename"),
    @NamedQuery(name = "Transactiontype.findByDescription", query = "SELECT t FROM Transactiontype t WHERE t.description = :description"),
    @NamedQuery(name = "Transactiontype.findByIsdeleted", query = "SELECT t FROM Transactiontype t WHERE t.isdeleted = :isdeleted")})
public class Transactiontype implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "TransactiontypeID")
    private Long transactiontypeID;
    @Column(name = "transactypename")
    private String transactypename;
    @Column(name = "description")
    private String description;
    @Column(name = "isdeleted")
    private Boolean isdeleted;
    
    public Transactiontype() {
    }

    public Transactiontype(Long transactiontypeID) {
        this.transactiontypeID = transactiontypeID;
    }

    public Long getTransactiontypeID() {
        return transactiontypeID;
    }

    public void setTransactiontypeID(Long transactiontypeID) {
        this.transactiontypeID = transactiontypeID;
    }

    public String getTransactypename() {
        return transactypename;
    }

    public void setTransactypename(String transactypename) {
        this.transactypename = transactypename;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Boolean getIsdeleted() {
        return isdeleted;
    }

    public void setIsdeleted(Boolean isdeleted) {
        this.isdeleted = isdeleted;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (transactiontypeID != null ? transactiontypeID.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Transactiontype)) {
            return false;
        }
        Transactiontype other = (Transactiontype) object;
        if ((this.transactiontypeID == null && other.transactiontypeID != null) || (this.transactiontypeID != null && !this.transactiontypeID.equals(other.transactiontypeID))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.restaurant.domain.Transactiontype[transactiontypeID=" + transactiontypeID + "]";
    }

}
